package wang.encoding.mroot.common.task

/*
 * // +-------------------------------------------------------------------------------------------------
 * // |                 有你就好 [ 有节骨乃坚，无心品自端 ]     <http://encoding.wang>
 * // +-------------------------------------------------------------------------------------------------
 * // |                             独在异乡为异客         每逢佳节倍思亲
 * // +-------------------------------------------------------------------------------------------------
 * // |                 联系:   <707069100@qq.com>      <http://weibo.com/513778937>
 * // +-------------------------------------------------------------------------------------------------
 */

// -----------------------------------------------------------------------------------------------------
// +----------------------------------------------------------------------------------------------------
// |                   ErYang出品 属于小极品          共同学习    共同进步
// +----------------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------------------


import org.springframework.scheduling.annotation.Async
import org.springframework.scheduling.annotation.AsyncResult
import org.springframework.stereotype.Component
import java.util.concurrent.Future


/**
 * 异步调用
 *
 * @author ErYang
 */
@Component
class CommonAsyncTask {


    /**
     * 根据名称清空 role 缓存
     *
     * @param name cache 名称
     *
     * @return Future<String>
     */
    @Async
    fun removeRoleCacheByName(name: String): Future<String> {
        return AsyncResult(">>>>>>>>removeRoleCacheByName执行完毕<<<<<<<<")
    }

    // -------------------------------------------------------------------------------------------------

    /**
     * 根据名称清空 rule 缓存
     *
     * @param name cache 名称
     *
     * @return Future<String>
     */
    @Async
    fun removeRuleCacheByName(vararg name: String): Future<String> {
        return AsyncResult(">>>>>>>>removeRuleCacheByName执行完毕<<<<<<<<")
    }

    // -------------------------------------------------------------------------------------------------

}

// -----------------------------------------------------------------------------------------------------

// End CommonAsyncTask class

/* End of file CommonAsyncTask.kt */
/* Location: ./src/main/kotlin/wang/encoding/mroot/common/task/CommonAsyncTask.kt */

// -----------------------------------------------------------------------------------------------------
// +----------------------------------------------------------------------------------------------------
// |                           ErYang出品 属于小极品  O(∩_∩)O~~   共同学习    共同进步
// +----------------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------------------

// -----------------------------------------------------------------------------------------------------

